﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace CardLogistics.DAL.CardRecovery
{
    public class CARDRECOVERY_RETURNCARD_DETAILData
    {
        #region 查询
        /// <summary>
        /// 根据条件查询相应的表的字段
        /// </summary>
        /// <param name="StrWhere">查询条件</param>
        /// <param name="StrFields">要查询的字段</param>
        /// <returns>填充完数据的DataTable</returns>
        public DataTable GetList(string StrWhere, string StrFields)
        {
            return CommonData.GetListOrderBy(StrWhere, "CARDRECOVERY_RETURNCARD_DETAIL", StrFields, "startno", 1);
        }

        /// <summary>
        /// 根据编号查询基本信息
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>填充完数据的DataTable</returns>
        public DataTable GetInfoById(string id)
        {
            return GetList(" ID = '" + id + "' ", "*");
        }
        /// <summary>
        /// 根据编号查询基本信息
        /// </summary>
        /// <param name="scrapid">主表Id</param>
        /// <returns>填充完数据的DataTable</returns>
        public DataTable GetInfoByReturnId(string ReturnId)
        {
            return GetList(" RETURNID = '" + ReturnId + "' ", "*");
        }
        #endregion
    }
}
